package com.ruoqing.gateway.controller;

import com.ruoqing.gateway.service.GateWayService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
	* @author YaoXian
	* @title: GateWayInitController
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 网关服务 - 初始化网关路由信息
	* @date 2020-11-09 23:24
	*/
@RestController
public class GateWayInitController {
		
		@Resource
		private GateWayService gateWayService;
		
		@RequestMapping(path = "/refreshGateWay")
		public String refreshGateWay(){
				gateWayService.initAllRoute();
				return "刷新成功,从数据库获取最新路由信息";
		}
}
